data(GvHD)
nc <- ncdfFlowSet(GvHD[1:2])
samples <- sampleNames(nc)
sn <- samples[1]
#return the entire flowFrame
fr <- nc[[sn]]
apply(exprs(nc[[sn]]), 2, range)
#transform the data
lgcl <- logicleTransform( w = 0.5, t= 10000, m =4.5)
fr_trans <- transform(fr, `FL1-H` = lgcl(`FL1-H`), `FL2-H` = lgcl(`FL2-H`))
#update the data
nc[[sn]] <- fr_trans
apply(exprs(nc[[sn]]), 2, range)
#subset on channels
nc1 <- nc[,2:3]
#only write the channels of interest (reduce disk IO)
nc1[[sn]] <- fr_trans[,2:3]
#chanel colnames
colnames(fr_trans)[3:4] <- c("<FL1-H>", "<FL2-H>")
#write data without matching up the colnames
nc[[sn, only.exprs = TRUE]] <- fr_trans
Run the code above in your browser using DataLab